{% extends "base.html" %}

{% block content %}
    <div class="pageHeader">
        <form onsubmit="return navTabSearch(this);" action="{{full_path}}" method="post">
            <div class="searchBar">

                <table class="searchContent">
                    <tbody><tr>
                        <td>
                            起始日期：<input type="text" class="date textInput readonly" name="dt1" value="{{dt1|date:'Y-m-d'}}"  readonly="true">
                        </td>
                        <td>
                            终止日期：<input type="text" class="date textInput readonly" name="dt2" value="{{dt2|date:'Y-m-d'}}"  readonly="true">
                        </td>
                    </tr>
                    </tbody></table>
                <div class="subBar">
                    <ul>
                        <li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>

                    </ul>
                </div>
            </div>
        </form>
    </div>


    <div class="pageContent">
        <table class="list" width="100%"  >
            <thead>
            <tr>
                <th>编号</th>
                <th>标题</th>
                <th>关键字</th>
                <th>创建者</th>
                <th>报表类型</th>
                <th>开始时间</th>
                <th>结束时间</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {%for schedule in list.object_list%}
                <tr >
                    <td>{{schedule.id}}</td>
                    <td>{{schedule.title}}</td>
                    <td>{{schedule.keyword}}</td>
                    <td>{{schedule.created_by.last_name}}</td>
                    <td>{{schedule.schedule_type.name}}</td>
                    <td>{{schedule.start_date|date:"Y-m-d"}}</td>
                    <td>{{schedule.end_date|date:"Y-m-d"}}</td>
                    <td>{% if schedule.status == 0 %}开放{%endif%}{% if schedule.status == 1 %}已提交{%endif%}{%if schedule.status == 2 %}已审核{%endif%}{%if schedule.status == 3 %}已回顾(提交){%endif%}</td>
                    <td>
                            {%if schedule.status < 3 %}{% if schedule.review %}<a href="/review/compose/{{schedule.id}}" target="navTab" rel="compose_page">编辑/提交</a>&nbsp;&nbsp;<a href="/review/commit/{{schedule.id}}" target="navTab" rel="compose_page" >提交</a>{%else%}&nbsp;&nbsp;<a href="/review/compose/{{schedule.id}}" target="navTab" rel="compose_page">填写回顾</a>{%endif%}{%endif%}&nbsp;&nbsp;<a href="/schedule/view/{{schedule.id}}" target="navTab" rel="view_schedule_page" >查看</a>
                    </td>
                </tr>
            {%endfor%}
            </tbody>
        </table></div>
            <div class="panelBar">
          <div class="pagination" targettype="navTab" totalcount="{{list.count}}" numperpage="10" pagenumshown="10" currentpage="{{list.number}}"></div>
        </div>
{% endblock %}